/*****************************************************
*                                                                          
*               COPYRIGHT (c) 2017-2019 Hargic Corporation                 
*                         All Rights Reserved                              
*                                                                          
* The source code contained or described herein and all documents          
* related to the source code ("Material") are owned by Hargic            
* Corporation or its licensors.  Title to the Material remains             
* with Hargic Corporation or its suppliers and licensors.                  
*                                                                          
* The Material is protected by worldwide copyright and trade secret        
* laws and treaty provisions. No part of the Material may be used,         
* copied, reproduced, modified, published, uploaded, posted, transmitted,  
* distributed, or disclosed in any way except in accordance with the       
* applicable license agreement.                                            
*                                                                          
* No license under any patent, copyright, trade secret or other            
* intellectual property right is granted to or conferred upon you by       
* disclosure or delivery of the Materials, either expressly, by            
* implication, inducement, estoppel, except in accordance with the         
* applicable license agreement.                                            
*                                                                          
* Unless otherwise agreed by Hargic in writing, you may not remove or      
* alter this notice or any other notice embedded in Materials by Hargic    
* or Hargic's suppliers or licensors in any way.                           
*                                                                          
** Author: shengda.huang
** Date: 2019-02-22
*
*****************************************************/

#ifndef __COMMON_H_
#define __COMMON_H_

#ifdef __cplusplus
extern "C"{
#endif


typedef char			i8;
typedef short 			i16;
typedef int 			i32;
typedef unsigned char  	u8;
typedef unsigned short 	u16;
typedef unsigned int   	u32;


#ifndef OS_PLATFORM
    #if defined(__thumb2__) || defined(_M_ARMT) /* I think MSVC only supports Thumb-2 targets */     
        #define OS_PLATFORM OS_ARM_THUMB2
    #elif defined(__thumb__)
        #define OS_PLATFORM OS_ARM_THUMB
    #elif defined(__arm__) || defined(_M_ARM)
        #define OS_PLATFORM OS_ARM
    #elif defined(__aarch64__)
        #define OS_PLATFORM OS_ARM64
    #elif defined(__i386__) || defined(_M_IX86) || defined(_X86_) || defined(__I86__)
        #define OS_PLATFORM OS_x86
    #elif defined(__amd64__) || defined(_M_X64)
        #define OS_PLATFORM OS_X86_64
    #else
        #define OS_PLATFORM OS_ARCH_OTHER
    #endif
#endif


#ifdef __cplusplus
}
#endif

#endif /* __COMMON_H_ */

